<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    #box ul{
        list-style: none;
    }
</style>
<body>
    <!-- 9.  在box元素中动态创建无序列表，自定义列表项内容。 -->
    <div id="box"></div>
    <script>
        var box = document.getElementById("box");
        var ul = document.createElement("ul");
        var names = ["1","2","3","4","5"];
        box.appendChild(ul);
        for (var i = 0; i < names.length; i++) {
            var li = document.createElement("li");
            ul.appendChild(li);
            li.innerText = names[i];
        }
    </script>
</body>
</html>